﻿
Imports GTA
Imports LemonUI.TimerBars

Public Class TimerBarProcessor
    Inherits Script
    Private Shared ReadOnly collection As TimerBarCollection = New TimerBarCollection()
    Public Shared Sub Add(timebar As TimerBar)
        SyncLock collection
            collection.Add(timebar)
        End SyncLock
    End Sub
    Public Shared Sub Remove(item As TimerBar)
        SyncLock collection
            collection.Remove(item)
        End SyncLock
    End Sub
    Public Sub New()
        Interval = 10
    End Sub
    Private Sub TimeBarProcessor_Tick(sender As Object, e As EventArgs) Handles Me.Tick
        collection.Process()
    End Sub
End Class
